<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /*   var arr = [1, 3, 5, 7, 9, 11, 15];
          var num = []
  
          function splice() {
              console.log(arr.splice(2, 4));
          }
          splice();
  
          function push(arr, num) {
              arr[arr.length] = num;
              return arr;
          }
          console.log(arr.push('张飞', 666), arr); */



        var arr = [1, 3, 4, 6, 7];
        var arr1 = [2, 3, 4];
        var arr3 = new Array();
        function push2(a) {
            for (let i = 0; i < arguments.length; i++) {
                a[a.length] = arguments[i]

            }
        }
        push2(arr, "你好", 'A', 'b');
        console.log(arr);

        push2(arr1, 'F');
        console.log(arr1);



        Array.prototype.push3 = function () {
            for (let i = 0; i < arguments.length; i++) {
                this[this.length] = arguments[i];

            }
        }

        arr3.push3('q', 'w', 'z');
        console.log(arr3);
    </script>
</body>

</html>